import Login from '../views/Login.vue'
import accountPasswordLogin from '../views/accountPasswordLogin'
import register from '../views/register.vue'
import CircleList from '../views/CircleList.vue'
import CircleCompanyList from '../views/CircleCompanyList.vue'
import JoinReview from '../views/JoinReview.vue'
import Reset from '../views/Reset.vue' //重置密码
import bingIphone from '../views/bingIphone.vue' //绑定手机
import userinfo from '../views/userinfo.vue'
import companyIndex from '../views/companyIndex.vue'
import companyData from '../views/companyData.vue'
import userCenter from '../views/userCenter.vue'
import crcircle from '../views/crcircle.vue'
import createNewCircle from '../views/createNewCircle.vue'
import createNewCompany from '../views/createNewCompany.vue'
import companyCreate from '../views/companyCreate.vue'
import Certification from '../views/Certification.vue'
import createSuccess from '../views/createSuccess.vue'
import inCompany from '../views/inCompany.vue'
import inCompanyOk from '../views/inCompanyOk.vue'
import applyCompanyAdmin from '../views/applyCompanyAdmin.vue'
import companyUpdate from '../views/companyUpdate.vue'
import circleindex from '../views/circleindex.vue'
// import HomePage from '../views/index.vue'
import incircle from '../views/incircle.vue'
import companyColleague from '../views/companyColleague.vue'
import companyBind from '../views/companyBind.vue'
import colleagueInfo from '../views/colleagueInfo.vue'
import uavatar from '../views/uavatar.vue' //用户名称修改
import userUpdate from '../views/userUpdate.vue' //用户修改页面
import NewUserUpdate from '../views/NewUserUpdate.vue' //用户编辑修改页面
import mupdate from '../views/mupdate.vue' //手机修改
import Setting from '../views/Setting.vue' //设置页
import UserCard from '../views/UserCard.vue' //名片展示页
import CardCreate from '../views/CardCreate.vue' //名片添加页
import JoinCircle from '../views/JoinCircle.vue' //加入圈子申请页
import ProductList from '../views/ProductList.vue' //商品列表
import newsList from '../views/newsList.vue' //新闻列表
import activityList from '../views/activityList.vue' //活动列表
import circleProduct from '../views/circleProduct.vue' //圈子产品
import circlenews from '../views/circlenews.vue' //圈子新闻
import circleActivity from '../views/circleActivity.vue' //圈子活动
import visitingCard from '../views/visitingCard.vue' //分享名片页面
import memberAssociation from '../views/memberAssociation.vue' //所有成员(协会成员)
import applicationList from '../views/applicationList.vue' //同事、企业申请列表
import giveFeedback from '../views/giveFeedback.vue' //意见反馈
import aboutUs from '../views/aboutUs.vue' //关于我们
import medalList from '../views/medalList.vue' //我的勋章
import Myintegral from '../views/Myintegral.vue' //我的积分
import userCompany from '../views/userCompany.vue' //更多我的企业列表
import userCircle from '../views/userCircle.vue' //更多我的圈子列表
import userWallet from '../views/userWallet.vue' //我的钱包
import smartPoster from '../views/smartPoster.vue' //智能海报
import productManage from '../views/productManage.vue' //产品管理
import newsManage from '../views/newsManage.vue' //新闻管理
import activityManage from '../views/activityManage.vue' //活动管理
import posterEditor from '../views/posterEditor.vue' //海报编辑
import posterSave from '../views/posterSave.vue' //海报保存
import productEditor from '../views/productEditor.vue' //产品编辑
import productInsert from '../views/productInsert.vue' //添加产品编辑
import newsEditor from '../views/newsEditor.vue' //新闻编辑
import newsInsert from '../views/newsInsert.vue' //添加新闻编辑
import activityEditor from '../views/activityEditor.vue' //活动编辑
import activityInsert from '../views/activityInsert.vue' //添加活动编辑
import productDetail from '../views/productDetail.vue' //产品详情
import newsDetail from '../views/newsDetail.vue' //新闻详情
import activityDetail from '../views/activityDetail.vue' //新闻详情
import usercardIndex from '../views/usercardIndex.vue' //名片首页
import usercardInfo from '../views/usercardInfo.vue' //名片资料
import editCard from '../views/editCard.vue' //名片编辑
import viewCard from '../views/viewCard.vue' //名片编辑
import viewCollectCard from '../views/viewCollectCard.vue' //名片编辑
import createCard from '../views/createCard.vue' //名片编辑
import circleApplication from '../views/circleApplication.vue' //圈子申请列表
import CircleUpdate from '../views/CircleUpdate.vue' //圈主编辑
import companyEditor from '../views/companyEditor.vue' //企业编辑
import authorization from '../views/authorization.vue' //网页授权
import inCompanyTwo from '../views/inCompanyTwo.vue' //加入他人企业补充资料
import userHomePage from '../views/userHomePage.vue' //我的个人首页
import companyDepart from '../views/companyDepart.vue' //组织架构
import companyColleagueDepart from '../views/companyColleagueDepart.vue' //组织架构
import myColleagueList from '../views/myColleagueList.vue' //我的同事列表
import CircleData from '../views/CircleData.vue' //圈子管理后台
import insertColleague from '../views/insertColleague.vue' //添加同事
import circleAssociation from '../views/circleAssociation.vue' //协会架构
// import companyTag from '../views/companyTag.vue' //企业标签
import myCollection from '../views/myCollection.vue' //我的收藏
import indexSearchresult from '../views/indexSearchresult.vue' //历史搜索
import companyProductList from '../views/companyProductList.vue' //企业产品列表
import companyNewsList from '../views/companyNewsList.vue' //企业新闻列表
import companyActivityList from '../views/companyActivityList.vue' //企业活动列表
import searchPage from '../views/searchPage.vue' //搜索页面
import Map from '../views/Map.vue' //百度地图
import mycircleColleagueList from '../views/mycircleColleagueList.vue' //圈子同事

// import demo1 from '../views/demo/demo1'

// import demo3 from '../views/demo/demo3'
// import demo2 from '../views/demo/demo2'
// import demo4 from '../views/demo/demo4'
// import demo5 from '../views/demo/demo5'
// import demo6 from '../views/demo/demo6'
// import demo7 from '../views/demo/demo7'
// import demo8 from '../views/demo/demo8'
// import demo9 from '../views/demo/demo9'



import Chat from '../IM/chat.vue' //聊天界面
import information from '../IM/information.vue'
import message from '../IM/message.vue'
import friend from '../IM/friend.vue'
import applyList from '../IM/applyList.vue'
import addfriend from '../IM/addfriend.vue'
import addgroup from '../IM/addgroup.vue' //创建群聊
import informationList from '../IM/informationList.vue' //消息首页
import informationDetail from '../IM/informationDetail.vue' //系统消息详情
import nearby from '../IM/nearby.vue' //

import cart from '../views/cart.vue'

import headerbar from '../public/index.vue'

let routes = [

    {
        path: '/home',
        name: 'home',
        // component: HomePage,
        component: resolve => require(['../views/index.vue'], resolve),
        hidden: true,
        meta: {
            requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
            keepAlive: true
        }
        // children: [{
        //     path: '/home',
        //     name: 'home',
        //     component: HomePage,
        //     meta: {
        //         requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
        //         keepAlive: true
        //     }
        // }, ]

    },
    {
        path: '/chat',
        component: Chat,
        name: 'Chat',
        hidden: true
    },
    {
        path: '/companyActivityList',
        component: companyActivityList,
        name: 'companyActivityList',
        hidden: true
    },
    {
        path: '/companyProductList',
        component: companyProductList,
        name: 'companyProductList',
        hidden: true
    },
    {
        path: '/companyNewsList',
        component: companyNewsList,
        name: 'companyNewsList',
        hidden: true
    },
    {
        path: '/headerbar',
        component: headerbar,
        name: 'headerbar',
        hidden: true
    },
    // {
    //     path: '/companyTag',
    //     component: companyTag,
    //     name: 'companyTag',
    //     hidden: true
    // },
    {
        path: '/login',
        component: Login,
        name: 'Login',
        hidden: true
    },
    {
        path: '/accountpasswordlogin',
        component: accountPasswordLogin,
        name: 'accountPasswordLogin',
        hidden: true
    },
    {
        path: '/register',
        component: register,
        name: '',
        hidden: true
    }, {
        path: '/home/CircleList',
        component: CircleList,
        name: 'CircleList',
        hidden: true
    }, {
        path: '/home/CircleCompanyList',
        component: CircleCompanyList,
        name: 'CircleCompanyList',
        hidden: true
    }, {
        path: '/JoinReview',
        component: JoinReview,
        name: 'JoinReview',
        hidden: true
    }, {
        path: '/Reset',
        component: Reset,
        name: '',
        hidden: true
    }, {
        path: '/userinfo',
        component: userinfo,
        name: 'userinfo',
        hidden: true
    }, {
        path: '/userCenter/companyIndex',
        component: companyIndex,
        name: 'companyIndex',
        hidden: true,
        meta: {
            keepAlive: true, // 此组件需要被缓存
            isBack: false, //用于判断上一个页面是哪个
        }
    },
    {
        path: '/userCenter/companyData',
        component: companyData,
        name: 'companyData',
        hidden: true
    }, {
        path: '/userCenter',
        component: userCenter,
        name: 'userCenter',
        hidden: true
    }, {
        path: '/crcircle',
        component: crcircle,
        name: 'crcircle',
        hidden: true
    }, {
        path: '/createNewCircle',
        component: createNewCircle,
        name: 'createNewCircle',
        hidden: true
    }, {
        path: '/createNewCompany',
        component: createNewCompany,
        name: 'createNewCompany',
        hidden: true
    }, {
        path: '/companyCreate',
        component: companyCreate,
        name: 'companyCreate',
        hidden: true
    }, {
        path: '/Certification',
        component: Certification,
        name: 'Certification',
        hidden: true
    }, {
        path: '/createSuccess',
        component: createSuccess,
        name: 'createSuccess',
        hidden: true
    }, {
        path: '/inCompany',
        component: inCompany,
        name: 'inCompany',
        hidden: true
    }, {
        path: '/inCompanyOk',
        component: inCompanyOk,
        name: 'inCompanyOk',
        hidden: true
    }, {
        path: '/applyCompanyAdmin',
        component: applyCompanyAdmin,
        name: 'applyCompanyAdmin',
        hidden: true
    }, {
        path: '/companyUpdate',
        component: companyUpdate,
        name: 'companyUpdate',
        hidden: true
    }, {
        path: '/userCenter/circleindex',
        component: circleindex,
        name: 'circleindex',
        hidden: true
    }, {
        path: '/incircle',
        component: incircle,
        name: 'incircle',
        hidden: true
    }, {
        path: '/userCenter/companyColleague',
        component: companyColleague,
        name: 'companyColleague',
        hidden: true
    }, {
        path: '/companyBind',
        component: companyBind,
        name: 'companyBind',
        hidden: true
    }, {
        path: '/colleagueInfo',
        component: colleagueInfo,
        name: 'colleagueInfo',
        hidden: true
    }, {
        path: '/userUpdate', //旧的用户修改中心
        component: userUpdate,
        name: 'userUpdate',
        hidden: true
    }, , {
        path: '/NewUserUpdate', //新的用户修改中心
        component: NewUserUpdate,
        name: 'NewUserUpdate',
        hidden: true
    },
    {
        path: '/uavatar',
        component: uavatar,
        name: 'uavatar',
        hidden: true
    },
    {
        path: '/mupdate',
        component: mupdate,
        name: 'mupdate',
        hidden: true
    },
    {
        path: '/information',
        component: information,
        name: 'information',
        hidden: true
    },
    {
        path: '/cart',
        component: cart,
        name: 'cart',
        hidden: true
    }, {
        path: '/Setting',
        component: Setting,
        name: 'Setting',
        hidden: true
    }, {
        path: '/UserCard',
        component: UserCard,
        name: 'UserCard',
        hidden: true
    },
    {
        path: '/CardCreate',
        component: CardCreate,
        name: 'CardCreate',
        hidden: true
    },
    {
        path: '/JoinCircle',
        component: JoinCircle,
        name: 'JoinCircle',
        hidden: true
    },
    {
        path: '/ProductList',
        component: ProductList,
        name: 'ProductList',
        hidden: true
    },
    {
        path: '/newsList',
        component: newsList,
        name: 'newsList',
        hidden: true
    },
    {
        path: '/activityList',
        component: activityList,
        name: 'activityList',
        hidden: true
    },
    {
        path: '/circleProduct',
        component: circleProduct,
        name: 'circleProduct',
        hidden: true
    },
    {
        path: '/circlenews',
        component: circlenews,
        name: 'circlenews',
        hidden: true
    },
    {
        path: '/circleActivity',
        component: circleActivity,
        name: 'circleActivity',
        hidden: true
    },
    {
        path: '/visitingCard',
        component: visitingCard,
        name: 'visitingCard',
        hidden: true
    },
    {
        path: '/memberAssociation',
        component: memberAssociation,
        name: 'memberAssociation',
        hidden: true
    },
    {
        path: '/applicationList',
        component: applicationList,
        name: 'applicationList',
        hidden: true
    },
    {
        path: '/giveFeedback',
        component: giveFeedback,
        name: 'giveFeedback',
        hidden: true
    },
    {
        path: '/aboutUs',
        component: aboutUs,
        name: 'aboutUs',
        hidden: true
    },
    {
        path: '/medalList',
        component: medalList,
        name: 'medalList',
        hidden: true
    },
    {
        path: '/Myintegral',
        component: Myintegral,
        name: 'Myintegral',
        hidden: true
    },
    {
        path: '/userCompany',
        component: userCompany,
        name: 'userCompany',
        hidden: true,
        meta: {
            keepAlive: true
        }
    },
    {
        path: '/userCircle',
        component: userCircle,
        name: 'userCircle',
        hidden: true
    },
    {
        path: '/userCenter/userWallet',
        component: userWallet,
        name: 'userWallet',
        hidden: true
    },
    {
        path: '/smartPoster',
        component: smartPoster,
        name: 'smartPoster',
        hidden: true
    },
    {
        path: '/userCenter/productManage',
        component: productManage,
        name: 'productManage',
        hidden: true
    },
    {
        path: '/userCenter/newsManage',
        component: newsManage,
        name: 'newsManage',
        hidden: true
    },
    {
        path: '/userCenter/activityManage',
        component: activityManage,
        name: 'activityManage',
        hidden: true
    },
    {
        path: '/posterEditor',
        component: posterEditor,
        name: 'posterEditor',
        hidden: true
    },
    {
        path: '/posterSave',
        component: posterSave,
        name: 'posterSave',
        hidden: true
    },
    {
        path: '/userCenter/productEditor',
        component: productEditor,
        name: 'productEditor',
        hidden: true
    },
    {
        path: '/userCenter/productInsert',
        component: productInsert,
        name: 'productInsert',
        hidden: true
    },
    {
        path: '/userCenter/newsEditor',
        component: newsEditor,
        name: 'newsEditor',
        hidden: true
    },
    {
        path: '/userCenter/newsInsert',
        component: newsInsert,
        name: 'newsInsert',
        hidden: true
    },
    {
        path: '/userCenter/activityEditor',
        component: activityEditor,
        name: 'activityEditor',
        hidden: true
    },
    {
        path: '/userCenter/activityInsert',
        component: activityInsert,
        name: 'activityInsert',
        hidden: true
    },
    //聊天
    {
        path: '/information/addfriend',
        component: addfriend,
        name: 'addfriend',
        hidden: true
    },
    {
        path: '/information/applyList',
        component: applyList,
        name: 'applyList',
        hidden: true
    },
    {
        path: '/friend',
        component: friend,
        name: 'friend',
        hidden: true
    },
    {
        path: '/message',
        component: message,
        name: 'message',
        hidden: true
    },
    {
        path: '/informationList',
        component: informationList,
        name: 'informationList',
        hidden: true
    },
    {
        path: '/productDetail',
        component: productDetail,
        name: 'productDetail',
        hidden: true
    },
    {
        path: '/newsDetail',
        component: newsDetail,
        name: 'newsDetail',
        hidden: true
    },
    {
        path: '/activityDetail',
        component: activityDetail,
        name: 'activityDetail',
        hidden: true
    },
    {
        path: '/information/addgroup',
        component: addgroup,
        name: 'addgroup',
        hidden: true
    },
    {
        path: '/UserCard/usercardIndex',
        component: usercardIndex,
        name: 'usercardIndex',
        hidden: true
    },
    {
        path: '/editCard',
        component: editCard,
        name: 'editCard',
        hidden: true
    },
    {
        path: '/userCenter/viewCard',
        component: viewCard,
        name: 'viewCard',
        hidden: true
    },
    {
        path: '/createCard',
        component: createCard,
        name: 'createCard',
        hidden: true
    },
    {
        path: '/viewCollectCard',
        component: viewCollectCard,
        name: 'viewCollectCard',
        hidden: true
    },
    {
        path: '/usercardInfo',
        component: usercardInfo,
        name: 'usercardInfo',
        hidden: true
    },
    {
        path: '/circleApplication',
        component: circleApplication,
        name: 'circleApplication',
        hidden: true
    },
    {
        path: '/userCenter/CircleUpdate',
        component: CircleUpdate,
        name: 'CircleUpdate',
        hidden: true
    },
    {
        path: '/userCenter/companyEditor',
        component: companyEditor,
        name: 'companyEditor',
        hidden: true
    },
    {
        path: '/bingIphone',
        component: bingIphone,
        name: 'bingIphone',
        hidden: true
    },
    {
        path: '/authorization',
        component: authorization,
        name: 'authorization',
        hidden: true
    },
    {
        path: '/inCompanyTwo',
        component: inCompanyTwo,
        name: 'inCompanyTwo',
        hidden: true
    },
    {
        path: '/userCenter/userHomePage',
        component: userHomePage,
        name: 'userHomePage',
        hidden: true
    },
    //demo1
    // {
    //     path: '/demo1',
    //     component: demo1,
    //     name: 'demo1',
    //     hidden: true
    // },
    //demo3
    // {
    //     path: '/demo3',
    //     component: demo3,
    //     name: 'demo3',
    //     hidden: true
    // },
    // {
    //     path: '/demo2',
    //     component: demo2,
    //     name: 'demo2',
    //     hidden: true,
    //     meta: {
    //         keepAlive: true
    //     }
    // },
    // {
    //     path: '/demo4',
    //     component: demo4,
    //     name: 'demo4',
    //     hidden: true
    // },
    // {
    //     path: '/demo5',
    //     component: demo5,
    //     name: 'demo5',
    //     hidden: true
    // },
    // {
    //     path: '/demo6',
    //     component: demo6,
    //     name: 'demo6',
    //     hidden: true
    // },
    // {
    //     path: '/demo7',
    //     component: demo7,
    //     name: 'demo7',
    //     hidden: true
    // },
    // {
    //     path: '/demo9',
    //     component: demo9,
    //     name: 'demo9',
    //     hidden: true
    // },
    // {
    //     path: '/demo8',
    //     component: demo8,
    //     name: 'demo8',
    //     hidden: true
    // },
    //组织架构
    {
        path: '/userCenter/companyDepart',
        component: companyDepart,
        name: 'companyDepart',
        hidden: true
    },
    {
        path: '/companyColleagueDepart',
        component: companyColleagueDepart,
        name: 'companyColleagueDepart',
        hidden: true
    },
    {
        path: '/userCenter/myColleagueList',
        component: myColleagueList,
        name: 'myColleagueList',
        hidden: true
    },
    {
        path: '/userCenter/CircleData',
        component: CircleData,
        name: 'CircleData',
        hidden: true
    },
    {
        path: '/insertColleague',
        component: insertColleague,
        name: 'insertColleague',
        hidden: true
    },
    {
        path: '/userCenter/circleAssociation',
        component: circleAssociation,
        name: 'circleAssociation',
        hidden: true
    },
    {
        path: '/myCollection',
        component: myCollection,
        name: 'myCollection',
        hidden: true
    },
    {
        path: '/indexSearchresult',
        component: indexSearchresult,
        name: 'indexSearchresult',
        hidden: true,
        meta: {
            // keepAlive: true, // 此组件需要被缓存
            // isBack: false, //用于判断上一个页面是哪个
        }
    },
    {
        path: '/searchPage',
        component: searchPage,
        name: 'searchPage',
        hidden: true,
        meta: {
            // keepAlive: true, // 此组件需要被缓存
            // isBack: false, //用于判断上一个页面是哪个
        }
    },
    {
        path: '/informationDetail',
        component: informationDetail,
        name: 'informationDetail',
        hidden: true
    },
    {
        path: '/nearby',
        component: nearby,
        name: 'nearby',
        hidden: true
    },
    {
        path: '/Map',
        component: Map,
        name: 'Map',
        hidden: true
    },
    // 圈子同事
    {
        path: '/userCenter/mycircleColleagueList',
        component: mycircleColleagueList,
        name: 'mycircleColleagueList',
        hidden: true
    },

    {
        path: '/',
        redirect: '/home',
        meta: {
            keepAlive: true, // 此组件需要被缓存
        }
    },
    {
        path: '/home/',
        redirect: '/home',
        meta: {
            keepAlive: true, // 此组件需要被缓存
        }
    },
    {
        path: '*',
        redirect: '/home',
        meta: {
            keepAlive: true, // 此组件需要被缓存
        }
    },



];

export default routes;